

<div class="bjui-pageHeader">
    <form id="pagerForm" data-toggle="ajaxsearch" action="${request.getContextPath()}/StepStatusAnalysis/stepStatusAnalysisStep" method="post">
        <div class="bjui-searchBar">
            <g:hiddenField name="SYS_QUERY_NAME" value="stepStatusAnalysisStep" />
            <g:hiddenField name="EXPORT_CONTENT_NAME" value="Excel" />
            <label>存货编码：</label>
            %{--<g:select name="partName" from="${stepStatusAnalysisStepPartNameList}" data-toggle="selectpicker" data-live-search="true" optionKey="part_name" optionValue="part_name" value="${partName}" noSelection="['':'ALL']" />&nbsp;--}%
            <input type="text" name="partName" value="${partName}"/>
            <label>产品名称：</label>
            %{--<g:select name="partDesc" from="${stepStatusAnalysisStepPartDescList}" data-toggle="selectpicker" data-live-search="true" optionKey="part_desc" optionValue="part_desc" value="${partDesc}" noSelection="['':'ALL']" />&nbsp;--}%
            <input type="text" name="partDesc" value="${partDesc}"/>
            <label>内部图号：</label>
            %{--<g:select name="group3" from="${stepStatusAnalysisStepGroupList}" data-toggle="selectpicker" data-live-search="true" optionKey="group3" optionValue="group3" value="${group3}" noSelection="['':'ALL']" />&nbsp;--}%
            <input type="text" name="group3" value="${group3}"/>
            <label>大组类：</label>
            %{--<g:select name="totalGroup" from="${stepStatusAnalysisStepTotalGroupList}" data-toggle="selectpicker" data-live-search="true" optionKey="total_group" optionValue="total_group" value="${totalGroup}" noSelection="['':'ALL']" />&nbsp;--}%
            <input type="text" name="totalGroup" value="${totalGroup}"/>
            <label>小分类：</label>
            %{-- <g:select name="detailCate" from="${stepStatusAnalysisStepDetailCateList}" data-toggle="selectpicker" data-live-search="true" optionKey="detail_cate" optionValue="detail_cate" value="${detailCate}" noSelection="['':'ALL']" />&nbsp;--}%
            <input type="text" name="detailCate" value="${detailCate}"/>
            <input name="stepName" type="hidden" value="${params.stepName}"/>
            <input name="state" type="hidden" value="${params.state}"/>
            <button type="submit" class="btn-default" data-icon="search">查询</button>&nbsp;
            <button type="button" class="btn-blue" onclick="javascript:bjuiExportExl('#pagerForm','${request.getContextPath()}/BadProcessAnalysis/exportExcel')" data-icon="file-excel-o" title="导出Excel">导出</button>&nbsp;
        </div>
    </form>
</div>

<div class="bjui-pageContent">

    <table  data-toggle="tablefixed" data-width="100%" data-nowrap="true">

        <thead>
        <tr>
            <g:each in="${tableHeadList}" status="j" var="headInstance">
                <g:if test="${headInstance!='RN'}">
                    <th  width="125"><g:message code="${headInstance}" default="${headInstance}"/></th>
                </g:if>
            </g:each>
        </tr>
        </thead>
        <tbody>
        <g:each in="${stepStatusAnalysisStep}" status="i" var="dataInstance">
            <tr>
                <g:each in="${tableHeadList}" status="j" var="headInstance">
                    <g:if test="${headInstance=='MAIN_QTY'}">
                        <td name="step${i}"><a href="${request.getContextPath()}/StepStatusAnalysis/stepStatusAnalysisStepTwo?stepName1=<%=dataInstance.STEP_NAME%>&state1=<%=params.state%>&partName1=<%=dataInstance.SAVEPARTCODE%>&group31=<%=dataInstance.GROUP3%>" data-toggle="navtab"  data-id="dialog-normal" data-options="{id:'stepStatusAnalysisStepTwo', title:'工序状况分析三级界面'}">${dataInstance["${headInstance}"] }</a></td>
                    </g:if>
                    <g:elseif test="${headInstance!='RN'}">

                        <td>${dataInstance["${headInstance}"] }</td>

                    </g:elseif>
                %{--<g:if test="${headInstance!='RN'}">
                    <td>${dataInstance["${headInstance}"] }</td>
                </g:if>--}%
                </g:each>

            </tr>
        </g:each>
        <tr>
            <td colspan="7">小计(当前页)</td>
            <td name="sumStep">0</td>
        </tr>
        <tr>
            <td colspan="7">合计(总)</td>
            <td>${stepStatusAnalysisStepSumQty[0].SUM_QTY}</td>
        </tr>
        </tbody>
    </table>
</div>

<g:render template="../template/pagination" />
<script>
    $(function(){
        var ss2=0;
        for(var i=0;i<${stepStatusAnalysisStep.size()};i++){
            var ss3='step'+i

            var sumSs1=$("td[name='"+ss3+"']").text()==''?0:parseInt($("td[name='"+ss3+"']").text())
            ss2+=sumSs1


        }
        $("td[name='sumStep']").html(ss2)


    })
</script>
